package com.bw.task.mvp.model;

import com.bw.task.api.Api;
import com.bw.task.api.ApiCCTV;
import com.bw.task.bean.PopupWindioBean;
import com.bw.task.bean.Vodiobean;
import com.bw.task.http.HttpLoad;
import com.bw.task.http.HttpRetrofit;
import com.bw.task.mvp.contern.UserContentThree;

import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

public class UserModelThree implements UserContentThree.mModel {


    //vertical/category/4e4d610cdf714d2966000000/vertical?limit=30&adult=false&first=2&order=new

    @Override
    public void destory() {

    }

    @Override
    public void requestv(String path , Observer<Vodiobean> observer) {
        HttpLoad.getInstance()
                .getRetrofit()
                .create(ApiCCTV.class)
                .getv("/zytestapi/video/findVideos?currentPage="+path+"&pageSize=20")
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(observer);
    }
    @Override
    public void requestgifit(Observer<PopupWindioBean> observer) {
        HttpRetrofit.getHttpRetrofit().getRetrofit()
                .create(Api.class)
                .getGifit()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(observer);
    }
}
